<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>过滤器</title>
		<script type="text/javascript" src="../vue.js"></script>
	</head>
	<body>
		<div id="app">
			<input type="text" name="" id="" value="" v-model="message" />
			<hr />
			<h2>{{message|reverse|uppercase}}</h2>
			<input type="text" v-model="msg"/>
			<span v-once>This will never change: {{ msg }}</span>
		</div>
		<script type="text/javascript">
		Vue.filter("reverse",function(value){
				return value.split('').reverse().join('');
			});
			Vue.filter("uppercase",function(value){
				return value.toUpperCase();
			});
			new Vue({
				el:"#app",
				data:{
					message:"hello,world!",
					msg:""
				},
				method:{}
			});
			
		</script>
	</body>
</html>
